﻿using System;
using System.Collections.Generic;
using System.Text;
using CartoLab.GeometryLib.Geometries;
namespace CartoLab.GeometryLib.SpatialProvider
{
    public interface IProvider<T>
    {
        T[] GetObjectsInEnvelope(Envelope envelope);
        //T[] GetObjectsEnvelopeIntersect(Envelope envolop);

        bool OnGeometryChange(T obj, Envelope oriExtent);
        /// <summary>
        /// 获取四叉树中所有的对象
        /// </summary>
        /// <returns></returns>
        T[] GetAllOjbect();

        /// <summary>
        /// 获取四叉树中对象的个数
        /// </summary>
        /// <returns></returns>
        int GetObjectCount();

        /// <summary>
        /// 四叉树中所有的对象的外接框
        /// </summary>
        /// <returns>boundingbox</returns>
        Envelope GetExtents();

        void AddObject(T t);
        bool DeleteObject(T t);
        void RemoveAll();
    }

}
